package com.zhongan.zuul.controller;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class BookApplication {

	@RequestMapping(value = "/available")
	public String available() {
		return "Spring in Action";
	}
	
	@RequestMapping(value = "/getDemo", method = RequestMethod.GET)
	public String getDemo(@RequestParam("param1") String param1) {
	    return param1;
	}
	
	@RequestMapping(value = "/checked-out")
	public String checkedOut() {
		return "Spring Boot in Action";
	}
	
	public static void main(String[] args) {
		SpringApplication.run(BookApplication.class, args);
	}
	
}
